//
//  LcApiError.m
//  18Birdies
//
//  Created by Lc on 15/3/24.
//  Copyright (c) 2015年 Lc. All rights reserved.
//

#import "LcApiError.h"

@implementation LcApiError

- (instancetype)initWithReasonCode:(LcApiErrorType)reasonCode
                            reason:(NSString*)reason {
  self = [super init];
  if (self) {
    _reasonCode = reasonCode;
    _reason = reason.copy;
  }
  return self;
}

+ (LcApiError*)apiErrorWithReasonCode:(LcApiErrorType)reasonCode
                               reason:(NSString*)reason {
  return [[self alloc] initWithReasonCode:reasonCode reason:reason];
}

@end
